1. Field of the Invention
The present invention relates to a method for and an apparatus for transparency conversion whereby the transparency at a polygon is changed based upon the Z components of the unit normal vectors at its vertices so that an impression of solidity can be rendered to a translucent polygon. In addition, the present invention relates to an image processing system equipped with the apparatus for transparency conversion.
2. Description of the Prior Art
In various types of game machines and image processing systems that utilize computer graphics, combinations of polygons are widely employed in order to display solid bodies placed within a virtual three dimensional space. The forms of expression of these polygons include transparent and translucent polygons as well as opaque polygons to express the various materials and the like of the solid bodies to be displayed. In addition, in order to render the texture of a solid body to be displayed, processes such as coloring the polygon, pasting a texture onto its surface and the like are performed. Moreover, when a plurality of polygons are placed on a display screen, they are structured in such a manner that their mutual positional relationships (foreground/background relationships) can be recognized. In other words, when polygons are positioned so that they overlay each other, such measures as hiding the polygon positioned behind and imposing perspective are taken to create the impression of depth perception and a sense of solid masses. It is to be noted that with a transparent polygon, when another object is positioned behind it, that object can be seen through the polygon in front without detracting from the color and the intensity of the object behind in any way whatsoever and that with a translucent polygon, objects behind can be seen through the polygon in front in a state in which the color and intensity of the object behind are varied in correspondence to the degree of transparency at the front polygon.
In order to perform the processing described above for each polygon, attributes such as vertex coordinates (X, Y, Z), vertex color (red, green, blue), texture coordinates (Tx, Ty), vertex transparency and normal vector at the vertex are provided for each vertex of the polygon. When expressing a solid body through this polygon, the attributes of each point (pixel) on ridge lines connecting the individual vertices are determined by complementing the attributes of each vertex and then attributes of all the pixels constituting the planar surface of the polygon are determined by complementing the attributes of the pixels on each ridge line.
For instance, when displaying a plurality of polygons, the decision making as to whether or not a specific polygon is positioned to the front of the screen with another polygon positioned behind it is performed by making a decision as to whether or not the two polygons are at positions that overlap through comparison of the X, Y coordinate values of the polygons to be compared and then by making a decision in regard to their foreground/background relationship through comparison of Z coordinate values of the individual pixels. While the direction of the normal vector of each pixel constituting a planar surface of a polygon determines the direction of the planar surface of the polygon (in which direction it is inclined), the normal vector of each pixel is determined through the complementary method by using the normal vectors of individual vertices. The normal vector of a vertex is found by taking the average of each normal vector of the polygons adjoining to the vertex. The expression of solid bodies with polygons can be equal to the approximate expression of the surface of solid bodies, which is formed by a series of curved surfaces, with polygons. Therefore, the normal vector of a vertex can be found as one point on the curved surface, that is, the vertical vector to the tangential plane at the vertex.
Furthermore, the color and the transparency at the planar surface of the polygon are determined through the complementary method based upon the color and the transparency at each vertex. As a result, a polygon in which the transparency and color change from one vertex to another can be expressed. In addition, in order to show patterns on the surface of a solid body, various patterns which are called textures are stored in memory in a texture map, which is prepared separately, and these textures are pasted onto the surface of the polygon in conformance to the texture coordinates.